<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Exil:  Fichier source de src/CalculTrajet.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Exil
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Structures&#160;de&#160;données</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Variables&#160;globale</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/CalculTrajet.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_calcul_trajet_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef CASESTRAJET_H</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define CASESTRAJET_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="_carte_8h.html" title="Création et gestion de Cartes, structure comprenant notamment un tableau de cases.">Carte.h</a>&quot;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00012"></a>00012 
<a name="l00018"></a><a class="code" href="struct_calc_traj.html">00018</a> <span class="keyword">struct </span><a class="code" href="struct_calc_traj.html">CalcTraj</a>
<a name="l00019"></a>00019 {
<a name="l00020"></a><a class="code" href="struct_calc_traj.html#a38948239d0567d5602d32cff3343c3f6">00020</a>   <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a>* <a class="code" href="struct_calc_traj.html#a38948239d0567d5602d32cff3343c3f6">caseCarte</a>;
<a name="l00021"></a><a class="code" href="struct_calc_traj.html#addf93bff89e281f7b80c76e352ed6a06">00021</a>   <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#addf93bff89e281f7b80c76e352ed6a06">coutDepAct</a>;
<a name="l00022"></a><a class="code" href="struct_calc_traj.html#a9f53a9ab42045838d8b54cac4a2c04d2">00022</a>   <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a9f53a9ab42045838d8b54cac4a2c04d2">coutActDest</a>;
<a name="l00023"></a><a class="code" href="struct_calc_traj.html#a2e3a77032493bac184725864c2e26b48">00023</a>   <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a2e3a77032493bac184725864c2e26b48">coutSomme</a>;
<a name="l00024"></a><a class="code" href="struct_calc_traj.html#a8f780829058cbe715e4753b3d21767ff">00024</a>   <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a8f780829058cbe715e4753b3d21767ff">xArr</a>;
<a name="l00025"></a><a class="code" href="struct_calc_traj.html#a154721a3a65cfa96917859be8765bdd4">00025</a>   <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a154721a3a65cfa96917859be8765bdd4">yArr</a>;
<a name="l00026"></a><a class="code" href="struct_calc_traj.html#aa6fd8f6d5488beb9214ac152269970fa">00026</a>   <span class="keyword">struct </span><a class="code" href="struct_calc_traj.html">CalcTraj</a>* <a class="code" href="struct_calc_traj.html#aa6fd8f6d5488beb9214ac152269970fa">parent</a>;
<a name="l00027"></a><a class="code" href="struct_calc_traj.html#a1f1b5d5e1f7692ea28e0b317c280c2ec">00027</a>   <span class="keyword">struct </span><a class="code" href="struct_calc_traj.html">CalcTraj</a>* <a class="code" href="struct_calc_traj.html#a1f1b5d5e1f7692ea28e0b317c280c2ec">calcSuivant</a>;
<a name="l00028"></a><a class="code" href="struct_calc_traj.html#a06440e710bc4b0ed44947093bbdfbdd0">00028</a>   <span class="keyword">struct </span><a class="code" href="struct_calc_traj.html">CalcTraj</a>* <a class="code" href="struct_calc_traj.html#a06440e710bc4b0ed44947093bbdfbdd0">calcPrecedent</a>;
<a name="l00029"></a>00029 
<a name="l00030"></a><a class="code" href="struct_calc_traj.html#a104713a84c2747a04a8a653aa070b464">00030</a>   <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a104713a84c2747a04a8a653aa070b464">nbElements</a>;
<a name="l00031"></a>00031 };
<a name="l00032"></a><a class="code" href="_calcul_trajet_8h.html#a198a980eaef9b4f76c9855e73378b4bc">00032</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_calc_traj.html">CalcTraj</a> <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>;
<a name="l00033"></a>00033 
<a name="l00040"></a>00040 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#a3b5182390c84e4912b39c8041b6bbe5b" title="initialise les valeurs d&#39;une structure CalculTrajet.">initCalcTraj</a>(<a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* calcTraj);
<a name="l00041"></a>00041 
<a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#ac3184de45b1026014c1518f0d70d5c82" title="alloue une structure CalculTrajet dans la mémoire.">creerCalcTraj</a>(<a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>** calcTraj);
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#a90503e6712a04408db7e8735254e6f19">setCalcTraj</a>(<a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* calcTraj, <a class="code" href="struct_carte.html" title="Informations concernant un ensemble de cases.">Carte</a>* carte, <span class="keywordtype">int</span> xDep, <span class="keywordtype">int</span> yDep, <span class="keywordtype">int</span> zDep, <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a8f780829058cbe715e4753b3d21767ff">xArr</a>, <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a154721a3a65cfa96917859be8765bdd4">yArr</a>);
<a name="l00051"></a>00051 
<a name="l00060"></a>00060 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#ae1f06f0da82da4fad9f966b03c412079">ajoutCasesAdjacentes</a>(<a class="code" href="struct_carte.html" title="Informations concernant un ensemble de cases.">Carte</a>* carte, <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>** listeOuverte, <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* listeFermee);
<a name="l00061"></a>00061 
<a name="l00068"></a>00068 <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* <a class="code" href="_calcul_trajet_8c.html#a2788ce3e26a093709137f52c2177413f">meilleureCase</a>(<a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* listeOuverte);
<a name="l00069"></a>00069 
<a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#acee962dc276d4ec0e5534e7092afb417">ajouterListeFermee</a>(<a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>** listeFermee, <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>** listeOuverte, <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* calcAjout);
<a name="l00078"></a>00078 
<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#a7a17b391cecb1a382b180410a4a57e7c">ordonneChemin</a>(<a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* listeFermee, <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>** listeTriee);
<a name="l00087"></a>00087 
<a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#ad072edefbf925ae85a5945e730d8ccb0">recherchePortionChemin</a>(<a class="code" href="struct_carte.html" title="Informations concernant un ensemble de cases.">Carte</a>* carte, <span class="keywordtype">int</span> xDep, <span class="keywordtype">int</span> yDep, <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a8f780829058cbe715e4753b3d21767ff">xArr</a>, <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a154721a3a65cfa96917859be8765bdd4">yArr</a>, <span class="keywordtype">int</span> zChemin, <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>** portionTrajet);
<a name="l00100"></a>00100 
<a name="l00112"></a>00112 <span class="keywordtype">int</span> <a class="code" href="_calcul_trajet_8c.html#a6b2d08a3a49070e13bb4e1b1ce885aa1" title="applique l&#39;algorithme A* dans une portion de chemin limitée à un étage">rechercheCoordonneeEscalier</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> zDep, <span class="keyword">const</span> <span class="keywordtype">int</span> zArr, <span class="keyword">const</span> <span class="keywordtype">int</span> xDep, <span class="keyword">const</span> <span class="keywordtype">int</span> yDep, <span class="keywordtype">int</span>* xEscalier, <span class="keywordtype">int</span>* yEscalier,<a class="code" href="struct_carte.html" title="Informations concernant un ensemble de cases.">Carte</a>* carte);
<a name="l00113"></a>00113 
<a name="l00126"></a>00126 <a class="code" href="struct_calcul_trajet.html" title="Définition de la structure CalculTrajet.">CalculTrajet</a>* <a class="code" href="_calcul_trajet_8c.html#a055bea506e6eb61c2bbe581ea268aa67" title="applique l&#39;algorithme A* pour trouver le chemin entre deux points donnés">rechercheChemin</a>(<span class="keywordtype">int</span> xDep, <span class="keywordtype">int</span> yDep, <span class="keywordtype">int</span> zDep, <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a8f780829058cbe715e4753b3d21767ff">xArr</a>, <span class="keywordtype">int</span> <a class="code" href="struct_calc_traj.html#a154721a3a65cfa96917859be8765bdd4">yArr</a>, <span class="keywordtype">int</span> zArr, <a class="code" href="struct_carte.html" title="Informations concernant un ensemble de cases.">Carte</a>* carte);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00133"></a>00133 <span class="keywordtype">void</span> <a class="code" href="_calcul_trajet_8c.html#afee49679212769c3563ae08e195424a5">testCalculTrajet</a>();
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Structures de données</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Définitions de type</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Généré le Mardi Juin 4 2013 00:35:14 pour Exil par &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
